package com.berry.MedCheck;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import com.berry.MedCheck.db.DBOperatorTest;

/**
 * Created with IntelliJ IDEA.
 * User: Airay.Rong
 * Date: 13-12-4
 * Time: 下午2:15
 * To change this template use File | Settings | File Templates.
 */
public class MenuActivity extends BaseActivity implements View.OnClickListener {
	private ImageButton mBtnSpo2;
	private ImageButton mBtnGraph;
	private ImageButton mBtnSetting;
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu_activity);
		mBtnSpo2 = (ImageButton) findViewById(R.id.menu_spo2);
		mBtnSpo2.setOnClickListener(this);
		mBtnGraph = (ImageButton) findViewById(R.id.menu_graph);
		mBtnGraph.setOnClickListener(this);
		mBtnSetting = (ImageButton) findViewById(R.id.menu_setting);
		mBtnSetting.setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		if (v == mBtnSpo2) {
			startActivity(new Intent().setClass(this,DataActivity.class));
			finish();
		}   else if (v == mBtnGraph) {
			startActivity(new Intent().setClass(this,GraphActivity.class));
			finish();
		}   else if (v == mBtnSetting) {
			startActivity(new Intent().setClass(this,SettingActivity.class));
			finish();
		}

	}
}